#!/bin/sh
serverIP=${hostNames}
targetFile=$1
remoteFloder=$2

servers=`awk 'BEGIN{list="'${serverIP}'";split(list,ip_list,",");for(ip in ip_list){print ip_list[ip];}}'`
for server in ${servers[*]}
do
    scp ${WORKSPACE}/${targetFile} root@$server:${remoteFloder}
done
